package design.instance;

import run.Child;

/**
 * 枚举实现单例
 *
 * @author wei.yang on 2018/8/13
 */
public enum ChildInstanceEnum {

    /**
     * 单例
     */
    INSTANCE;

    private Child child;

    ChildInstanceEnum() {
        this.child = new Child();
    }

    public Child getInstance() {
        return child;
    }
}
